import request from '@/utils/request'

export function getDishes() {
  return request({
    url: '/dishes',
    method: 'get'
  })
}

export function addDishes(data) {
  return request({
    url: '/admin/dishes',
    method: 'post',
    data: data
  })
}

export function updateDishes(data) {
  return request({
    url: '/admin/dishes',
    method: 'put',
    data: data
  })
}

export function deleteDishes(id) {
  return request({
    url: '/admin/dishes/' + id,
    method: 'delete'
  })
}

export function getDishById(DishId) {
  return request({
    url: '/dishes/' + DishId,
    method: 'get'
  })
}
